using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;

namespace Adex{
    public partial class SPs{
        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Setup_RestorePermissions Procedure
        /// </summary>
        public static StoredProcedure AspnetSetupRestorePermissions(string name)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Setup_RestorePermissions" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@name", name,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_NewCommercial_PDF Procedure
        /// </summary>
        public static StoredProcedure GetReportNewCommercialPdf(int? CompanyCode, DateTime? SDate, DateTime? EDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_NewCommercial_PDF" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@CompanyCode", CompanyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Setup_RemoveAllRoleMembers Procedure
        /// </summary>
        public static StoredProcedure AspnetSetupRemoveAllRoleMembers(string name)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Setup_RemoveAllRoleMembers" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@name", name,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the DeleteAllMediaByDateBetween Procedure
        /// </summary>
        public static StoredProcedure DeleteAllMediaByDateBetween(int? countryID, DateTime? SDate, DateTime? EDate, int? MediaType, int? ConditionAllDelete)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("DeleteAllMediaByDateBetween" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@countryID", countryID,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaType", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@ConditionAllDelete", ConditionAllDelete,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the AdminChangePassword Procedure
        /// </summary>
        public static StoredProcedure AdminChangePassword(Guid? UserID, string CurrentPassword, string NewPassword)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("AdminChangePassword" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Guid);
        	    
            sp.Command.AddParameter("@CurrentPassword", CurrentPassword,DbType.String);
        	    
            sp.Command.AddParameter("@NewPassword", NewPassword,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_RegisterSchemaVersion Procedure
        /// </summary>
        public static StoredProcedure AspnetRegisterSchemaVersion(string Feature, string CompatibleSchemaVersion, bool? IsCurrentVersion, bool? RemoveIncompatibleSchema)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_RegisterSchemaVersion" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@Feature", Feature,DbType.String);
        	    
            sp.Command.AddParameter("@CompatibleSchemaVersion", CompatibleSchemaVersion,DbType.String);
        	    
            sp.Command.AddParameter("@IsCurrentVersion", IsCurrentVersion,DbType.Boolean);
        	    
            sp.Command.AddParameter("@RemoveIncompatibleSchema", RemoveIncompatibleSchema,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_CheckSchemaVersion Procedure
        /// </summary>
        public static StoredProcedure AspnetCheckSchemaVersion(string Feature, string CompatibleSchemaVersion)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_CheckSchemaVersion" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@Feature", Feature,DbType.String);
        	    
            sp.Command.AddParameter("@CompatibleSchemaVersion", CompatibleSchemaVersion,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Applications_CreateApplication Procedure
        /// </summary>
        public static StoredProcedure AspnetApplicationsCreateApplication(string ApplicationName, Guid? ApplicationId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Applications_CreateApplication" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddOutputParameter("@ApplicationId",DbType.Guid);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UnRegisterSchemaVersion Procedure
        /// </summary>
        public static StoredProcedure AspnetUnRegisterSchemaVersion(string Feature, string CompatibleSchemaVersion)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UnRegisterSchemaVersion" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@Feature", Feature,DbType.String);
        	    
            sp.Command.AddParameter("@CompatibleSchemaVersion", CompatibleSchemaVersion,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Users_CreateUser Procedure
        /// </summary>
        public static StoredProcedure AspnetUsersCreateUser(Guid? ApplicationId, string UserName, bool? IsUserAnonymous, DateTime? LastActivityDate, Guid? UserId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Users_CreateUser" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationId", ApplicationId,DbType.Guid);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@IsUserAnonymous", IsUserAnonymous,DbType.Boolean);
        	    
            sp.Command.AddParameter("@LastActivityDate", LastActivityDate,DbType.DateTime);
        	    
            sp.Command.AddOutputParameter("@UserId",DbType.Guid);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Users_DeleteUser Procedure
        /// </summary>
        public static StoredProcedure AspnetUsersDeleteUser(string ApplicationName, string UserName, int? TablesToDeleteFrom, int? NumTablesDeletedFrom)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Users_DeleteUser" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@TablesToDeleteFrom", TablesToDeleteFrom,DbType.Int32);
        	    
            sp.Command.AddOutputParameter("@NumTablesDeletedFrom",DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_AnyDataInTables Procedure
        /// </summary>
        public static StoredProcedure AspnetAnyDataInTables(int? TablesToCheck)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_AnyDataInTables" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@TablesToCheck", TablesToCheck,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_CreateUser Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipCreateUser(string ApplicationName, string UserName, string Password, string PasswordSalt, string Email, string PasswordQuestion, string PasswordAnswer, bool? IsApproved, DateTime? CurrentTimeUtc, DateTime? CreateDate, int? UniqueEmail, int? PasswordFormat, Guid? UserId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_CreateUser" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@Password", Password,DbType.String);
        	    
            sp.Command.AddParameter("@PasswordSalt", PasswordSalt,DbType.String);
        	    
            sp.Command.AddParameter("@Email", Email,DbType.String);
        	    
            sp.Command.AddParameter("@PasswordQuestion", PasswordQuestion,DbType.String);
        	    
            sp.Command.AddParameter("@PasswordAnswer", PasswordAnswer,DbType.String);
        	    
            sp.Command.AddParameter("@IsApproved", IsApproved,DbType.Boolean);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@CreateDate", CreateDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UniqueEmail", UniqueEmail,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordFormat", PasswordFormat,DbType.Int32);
        	    
            sp.Command.AddOutputParameter("@UserId",DbType.Guid);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetUserByName Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipGetUserByName(string ApplicationName, string UserName, DateTime? CurrentTimeUtc, bool? UpdateLastActivity)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetUserByName" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UpdateLastActivity", UpdateLastActivity,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetUserByUserId Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipGetUserByUserId(Guid? UserId, DateTime? CurrentTimeUtc, bool? UpdateLastActivity)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetUserByUserId" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserId", UserId,DbType.Guid);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UpdateLastActivity", UpdateLastActivity,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetUserByEmail Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipGetUserByEmail(string ApplicationName, string Email)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetUserByEmail" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@Email", Email,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Internet_Paged Procedure
        /// </summary>
        public static StoredProcedure GetReportInternetPaged(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Internet_Paged" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetPasswordWithFormat Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipGetPasswordWithFormat(string ApplicationName, string UserName, bool? UpdateLastLoginActivityDate, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetPasswordWithFormat" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@UpdateLastLoginActivityDate", UpdateLastLoginActivityDate,DbType.Boolean);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_UpdateUserInfo Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipUpdateUserInfo(string ApplicationName, string UserName, bool? IsPasswordCorrect, bool? UpdateLastLoginActivityDate, int? MaxInvalidPasswordAttempts, int? PasswordAttemptWindow, DateTime? CurrentTimeUtc, DateTime? LastLoginDate, DateTime? LastActivityDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_UpdateUserInfo" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@IsPasswordCorrect", IsPasswordCorrect,DbType.Boolean);
        	    
            sp.Command.AddParameter("@UpdateLastLoginActivityDate", UpdateLastLoginActivityDate,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MaxInvalidPasswordAttempts", MaxInvalidPasswordAttempts,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordAttemptWindow", PasswordAttemptWindow,DbType.Int32);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@LastLoginDate", LastLoginDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@LastActivityDate", LastActivityDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetVideosAudios_Category Procedure
        /// </summary>
        public static StoredProcedure GetVideosAudiosCategory(int? MediaType, int? CategoryID, DateTime? SDate, DateTime? EDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetVideosAudios_Category" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@MediaType", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryID", CategoryID,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetPassword Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipGetPassword(string ApplicationName, string UserName, int? MaxInvalidPasswordAttempts, int? PasswordAttemptWindow, DateTime? CurrentTimeUtc, string PasswordAnswer)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetPassword" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@MaxInvalidPasswordAttempts", MaxInvalidPasswordAttempts,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordAttemptWindow", PasswordAttemptWindow,DbType.Int32);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@PasswordAnswer", PasswordAnswer,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_All_Count Procedure
        /// </summary>
        public static StoredProcedure GetReportAllCount(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, bool? SearchFromIN, string MediaCodes, string SectorName, string SubSectorName, string CategoryName, string AdvertiserName, string BrandName, string ProductName, string AgencyName, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_All_Count" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromIN", SearchFromIN,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorName", SectorName,DbType.String);
        	    
            sp.Command.AddParameter("@SubSectorName", SubSectorName,DbType.String);
        	    
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@AdvertiserName", AdvertiserName,DbType.String);
        	    
            sp.Command.AddParameter("@BrandName", BrandName,DbType.String);
        	    
            sp.Command.AddParameter("@ProductName", ProductName,DbType.String);
        	    
            sp.Command.AddParameter("@AgencyName", AgencyName,DbType.String);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_SetPassword Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipSetPassword(string ApplicationName, string UserName, string NewPassword, string PasswordSalt, DateTime? CurrentTimeUtc, int? PasswordFormat)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_SetPassword" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@NewPassword", NewPassword,DbType.String);
        	    
            sp.Command.AddParameter("@PasswordSalt", PasswordSalt,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@PasswordFormat", PasswordFormat,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetVideosAudios_CategoryName Procedure
        /// </summary>
        public static StoredProcedure GetVideosAudiosCategoryName(int? MediaType, string CategoryName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetVideosAudios_CategoryName" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@MediaType", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_ResetPassword Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipResetPassword(string ApplicationName, string UserName, string NewPassword, int? MaxInvalidPasswordAttempts, int? PasswordAttemptWindow, string PasswordSalt, DateTime? CurrentTimeUtc, int? PasswordFormat, string PasswordAnswer)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_ResetPassword" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@NewPassword", NewPassword,DbType.String);
        	    
            sp.Command.AddParameter("@MaxInvalidPasswordAttempts", MaxInvalidPasswordAttempts,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordAttemptWindow", PasswordAttemptWindow,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordSalt", PasswordSalt,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@PasswordFormat", PasswordFormat,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordAnswer", PasswordAnswer,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_All_PagedExport Procedure
        /// </summary>
        public static StoredProcedure GetReportAllPagedExport(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, string MediaCodes, string SectorName, string SubSectorName, string CategoryName, string AdvertiserName, string BrandName, string ProductName, string AgencyName, int? SPrice, int? EPrice, bool? Fa, int? MediaType, bool? SearchFromIN, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_All_PagedExport" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorName", SectorName,DbType.String);
        	    
            sp.Command.AddParameter("@SubSectorName", SubSectorName,DbType.String);
        	    
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@AdvertiserName", AdvertiserName,DbType.String);
        	    
            sp.Command.AddParameter("@BrandName", BrandName,DbType.String);
        	    
            sp.Command.AddParameter("@ProductName", ProductName,DbType.String);
        	    
            sp.Command.AddParameter("@AgencyName", AgencyName,DbType.String);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@SearchFromIN", SearchFromIN,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_UnlockUser Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipUnlockUser(string ApplicationName, string UserName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_UnlockUser" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Commercial_Count Procedure
        /// </summary>
        public static StoredProcedure GetReportCommercialCount(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SDuration, int? EDuration, int? PosInBreak, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Commercial_Count" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDuration", SDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@EDuration", EDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@PosInBreak", PosInBreak,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_UpdateUser Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipUpdateUser(string ApplicationName, string UserName, string Email, string Comment, bool? IsApproved, DateTime? LastLoginDate, DateTime? LastActivityDate, int? UniqueEmail, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_UpdateUser" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@Email", Email,DbType.String);
        	    
            sp.Command.AddParameter("@Comment", Comment,DbType.String);
        	    
            sp.Command.AddParameter("@IsApproved", IsApproved,DbType.Boolean);
        	    
            sp.Command.AddParameter("@LastLoginDate", LastLoginDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@LastActivityDate", LastActivityDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UniqueEmail", UniqueEmail,DbType.Int32);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Commercial_PagedExport Procedure
        /// </summary>
        public static StoredProcedure GetReportCommercialPagedExport(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SDuration, int? EDuration, int? PosInBreak, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Commercial_PagedExport" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDuration", SDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@EDuration", EDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@PosInBreak", PosInBreak,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_ChangePasswordQuestionAndAnswer Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipChangePasswordQuestionAndAnswer(string ApplicationName, string UserName, string NewPasswordQuestion, string NewPasswordAnswer)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_ChangePasswordQuestionAndAnswer" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@NewPasswordQuestion", NewPasswordQuestion,DbType.String);
        	    
            sp.Command.AddParameter("@NewPasswordAnswer", NewPasswordAnswer,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetAllUsers Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipGetAllUsers(string ApplicationName, int? PageIndex, int? PageSize)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetAllUsers" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@PageIndex", PageIndex,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Press_Count Procedure
        /// </summary>
        public static StoredProcedure GetReportPressCount(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Press_Count" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetNumberOfUsersOnline Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipGetNumberOfUsersOnline(string ApplicationName, int? MinutesSinceLastInActive, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetNumberOfUsersOnline" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@MinutesSinceLastInActive", MinutesSinceLastInActive,DbType.Int32);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Press_PagedExport Procedure
        /// </summary>
        public static StoredProcedure GetReportPressPagedExport(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Press_PagedExport" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_FindUsersByName Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipFindUsersByName(string ApplicationName, string UserNameToMatch, int? PageIndex, int? PageSize)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_FindUsersByName" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNameToMatch", UserNameToMatch,DbType.String);
        	    
            sp.Command.AddParameter("@PageIndex", PageIndex,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Internet_Count Procedure
        /// </summary>
        public static StoredProcedure GetReportInternetCount(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Internet_Count" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_FindUsersByEmail Procedure
        /// </summary>
        public static StoredProcedure AspnetMembershipFindUsersByEmail(string ApplicationName, string EmailToMatch, int? PageIndex, int? PageSize)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_FindUsersByEmail" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@EmailToMatch", EmailToMatch,DbType.String);
        	    
            sp.Command.AddParameter("@PageIndex", PageIndex,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Internet_Pagedexport Procedure
        /// </summary>
        public static StoredProcedure GetReportInternetPagedexport(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Internet_Pagedexport" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_OutDoor_Count Procedure
        /// </summary>
        public static StoredProcedure GetReportOutDoorCount(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, int? Size, string Quality, int? TypeOfAds, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_OutDoor_Count" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Size", Size,DbType.Int32);
        	    
            sp.Command.AddParameter("@Quality", Quality,DbType.String);
        	    
            sp.Command.AddParameter("@TypeOfAds", TypeOfAds,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_OutDoor_PagedExport Procedure
        /// </summary>
        public static StoredProcedure GetReportOutDoorPagedExport(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, int? Size, string Quality, int? TypeOfAds, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_OutDoor_PagedExport" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Size", Size,DbType.Int32);
        	    
            sp.Command.AddParameter("@Quality", Quality,DbType.String);
        	    
            sp.Command.AddParameter("@TypeOfAds", TypeOfAds,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetSiteUsers_ModuleStatus Procedure
        /// </summary>
        public static StoredProcedure GetSiteUsersModuleStatus(string UserID, int? ModuleID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetSiteUsers_ModuleStatus" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.String);
        	    
            sp.Command.AddParameter("@ModuleID", ModuleID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetSiteUsers_ModuleStatusAll Procedure
        /// </summary>
        public static StoredProcedure GetSiteUsersModuleStatusAll(string UserID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetSiteUsers_ModuleStatusAll" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetLastAvailable_All Procedure
        /// </summary>
        public static StoredProcedure GetLastAvailableAll()
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetLastAvailable_All" , DataService.GetInstance("Adex"));
        	
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetVideosAudios_ProductName Procedure
        /// </summary>
        public static StoredProcedure GetVideosAudiosProductName(int? MediaType, string ProductName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetVideosAudios_ProductName" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@MediaType", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductName", ProductName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetVideosAudios_AdvertiserName Procedure
        /// </summary>
        public static StoredProcedure GetVideosAudiosAdvertiserName(int? MediaType, string AdvertiserName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetVideosAudios_AdvertiserName" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@MediaType", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserName", AdvertiserName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_IsUserInRole Procedure
        /// </summary>
        public static StoredProcedure AspnetUsersInRolesIsUserInRole(string ApplicationName, string UserName, string RoleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_IsUserInRole" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_GetRolesForUser Procedure
        /// </summary>
        public static StoredProcedure AspnetUsersInRolesGetRolesForUser(string ApplicationName, string UserName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_GetRolesForUser" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the SiteUser_Insert Procedure
        /// </summary>
        public static StoredProcedure SiteUserInsert(int? SiteUserID, string IpAddress)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("SiteUser_Insert" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@SiteUserID", SiteUserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@IpAddress", IpAddress,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Roles_CreateRole Procedure
        /// </summary>
        public static StoredProcedure AspnetRolesCreateRole(string ApplicationName, string RoleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Roles_CreateRole" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the SiteUser_Detail Procedure
        /// </summary>
        public static StoredProcedure SiteUserDetail(int? SiteUserID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("SiteUser_Detail" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@SiteUserID", SiteUserID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Roles_DeleteRole Procedure
        /// </summary>
        public static StoredProcedure AspnetRolesDeleteRole(string ApplicationName, string RoleName, bool? DeleteOnlyIfRoleIsEmpty)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Roles_DeleteRole" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            sp.Command.AddParameter("@DeleteOnlyIfRoleIsEmpty", DeleteOnlyIfRoleIsEmpty,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Roles_RoleExists Procedure
        /// </summary>
        public static StoredProcedure AspnetRolesRoleExists(string ApplicationName, string RoleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Roles_RoleExists" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetVideosAudios_Product Procedure
        /// </summary>
        public static StoredProcedure GetVideosAudiosProduct(int? MediaType, int? ProductID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetVideosAudios_Product" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@MediaType", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductID", ProductID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_AddUsersToRoles Procedure
        /// </summary>
        public static StoredProcedure AspnetUsersInRolesAddUsersToRoles(string ApplicationName, string UserNames, string RoleNames, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_AddUsersToRoles" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNames", UserNames,DbType.String);
        	    
            sp.Command.AddParameter("@RoleNames", RoleNames,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetVideosAudios_Advertiser Procedure
        /// </summary>
        public static StoredProcedure GetVideosAudiosAdvertiser(int? MediaType, int? AdvertiserID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetVideosAudios_Advertiser" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@MediaType", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserID", AdvertiserID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_RemoveUsersFromRoles Procedure
        /// </summary>
        public static StoredProcedure AspnetUsersInRolesRemoveUsersFromRoles(string ApplicationName, string UserNames, string RoleNames)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_RemoveUsersFromRoles" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNames", UserNames,DbType.String);
        	    
            sp.Command.AddParameter("@RoleNames", RoleNames,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetCompetitionBrands_CategoryName Procedure
        /// </summary>
        public static StoredProcedure GetCompetitionBrandsCategoryName(string CategoryName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetCompetitionBrands_CategoryName" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_GetUsersInRoles Procedure
        /// </summary>
        public static StoredProcedure AspnetUsersInRolesGetUsersInRoles(string ApplicationName, string RoleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_GetUsersInRoles" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_FindUsersInRole Procedure
        /// </summary>
        public static StoredProcedure AspnetUsersInRolesFindUsersInRole(string ApplicationName, string RoleName, string UserNameToMatch)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_FindUsersInRole" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNameToMatch", UserNameToMatch,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Roles_GetAllRoles Procedure
        /// </summary>
        public static StoredProcedure AspnetRolesGetAllRoles(string ApplicationName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Roles_GetAllRoles" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Competition Procedure
        /// </summary>
        public static StoredProcedure GetReportCompetition(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, string MediaCodes, string SectorName, string SubSectorName, string CategoryName, string BrandName, int? MediaType, bool? SearchFromIN, string BrandNames)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Competition" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorName", SectorName,DbType.String);
        	    
            sp.Command.AddParameter("@SubSectorName", SubSectorName,DbType.String);
        	    
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@BrandName", BrandName,DbType.String);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@SearchFromIN", SearchFromIN,DbType.Boolean);
        	    
            sp.Command.AddParameter("@BrandNames", BrandNames,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_CompetitionCount Procedure
        /// </summary>
        public static StoredProcedure GetReportCompetitionCount(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, string MediaCodes, string SectorName, string SubSectorName, string CategoryName, string BrandName, int? MediaType, bool? SearchFromIN, string BrandNames)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_CompetitionCount" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorName", SectorName,DbType.String);
        	    
            sp.Command.AddParameter("@SubSectorName", SubSectorName,DbType.String);
        	    
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@BrandName", BrandName,DbType.String);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@SearchFromIN", SearchFromIN,DbType.Boolean);
        	    
            sp.Command.AddParameter("@BrandNames", BrandNames,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GenerateScript_Indexes Procedure
        /// </summary>
        public static StoredProcedure GenerateScriptIndexes()
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GenerateScript_Indexes" , DataService.GetInstance("Adex"));
        	
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_CompetitionCountGraph Procedure
        /// </summary>
        public static StoredProcedure GetReportCompetitionCountGraph(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, string MediaCodes, string SectorName, string SubSectorName, string CategoryName, string BrandName, int? MediaType, bool? SearchFromIN, string BrandNames)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_CompetitionCountGraph" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorName", SectorName,DbType.String);
        	    
            sp.Command.AddParameter("@SubSectorName", SubSectorName,DbType.String);
        	    
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@BrandName", BrandName,DbType.String);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@SearchFromIN", SearchFromIN,DbType.Boolean);
        	    
            sp.Command.AddParameter("@BrandNames", BrandNames,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetLookupTables Procedure
        /// </summary>
        public static StoredProcedure GetLookupTables(int? Uid, string Type)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetLookupTables" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@Uid", Uid,DbType.Int32);
        	    
            sp.Command.AddParameter("@Type", Type,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_CompetitionGraph Procedure
        /// </summary>
        public static StoredProcedure GetReportCompetitionGraph(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, string MediaCodes, string SectorName, string SubSectorName, string CategoryName, string BrandName, int? MediaType, bool? SearchFromIN, string BrandNames)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_CompetitionGraph" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorName", SectorName,DbType.String);
        	    
            sp.Command.AddParameter("@SubSectorName", SubSectorName,DbType.String);
        	    
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@BrandName", BrandName,DbType.String);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@SearchFromIN", SearchFromIN,DbType.Boolean);
        	    
            sp.Command.AddParameter("@BrandNames", BrandNames,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetPagedDataSet Procedure
        /// </summary>
        public static StoredProcedure GetPagedDataSet(int? PageSize, int? PageNumber)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetPagedDataSet" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageNumber", PageNumber,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_All Procedure
        /// </summary>
        public static StoredProcedure GetReportAll(int? UserID, byte? CountryID, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, string MediaCodes, int? SectorCode, int? SubSectorCode, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SPrice, int? EPrice, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_All" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetPlanning_SelectedMedia Procedure
        /// </summary>
        public static StoredProcedure GetPlanningSelectedMedia(string MediaCode)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetPlanning_SelectedMedia" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@MediaCode", MediaCode,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_All_Paged Procedure
        /// </summary>
        public static StoredProcedure GetReportAllPaged(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, string MediaCodes, string SectorName, string SubSectorName, string CategoryName, string AdvertiserName, string BrandName, string ProductName, string AgencyName, int? SPrice, int? EPrice, bool? Fa, int? MediaType, bool? SearchFromIN, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_All_Paged" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorName", SectorName,DbType.String);
        	    
            sp.Command.AddParameter("@SubSectorName", SubSectorName,DbType.String);
        	    
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@AdvertiserName", AdvertiserName,DbType.String);
        	    
            sp.Command.AddParameter("@BrandName", BrandName,DbType.String);
        	    
            sp.Command.AddParameter("@ProductName", ProductName,DbType.String);
        	    
            sp.Command.AddParameter("@AgencyName", AgencyName,DbType.String);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@SearchFromIN", SearchFromIN,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Planning_Paged Procedure
        /// </summary>
        public static StoredProcedure GetReportPlanningPaged(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Planning_Paged" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Commercial Procedure
        /// </summary>
        public static StoredProcedure GetReportCommercial(int? UserID, string ReportColumns, byte? CountryID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SDuration, int? EDuration, int? PosInBreak, int? SPrice, int? EPrice, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Commercial" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@ReportColumns", ReportColumns,DbType.String);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDuration", SDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@EDuration", EDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@PosInBreak", PosInBreak,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetPlanning_SelectedBillBordsTypeOfCarriers Procedure
        /// </summary>
        public static StoredProcedure GetPlanningSelectedBillBordsTypeOfCarriers(string MediaCode, string Carrier)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetPlanning_SelectedBillBordsTypeOfCarriers" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@MediaCode", MediaCode,DbType.String);
        	    
            sp.Command.AddParameter("@Carrier", Carrier,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Commercial_Paged Procedure
        /// </summary>
        public static StoredProcedure GetReportCommercialPaged(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SDuration, int? EDuration, int? PosInBreak, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Commercial_Paged" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDuration", SDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@EDuration", EDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@PosInBreak", PosInBreak,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the EditContactUsContent Procedure
        /// </summary>
        public static StoredProcedure EditContactUsContent(string Content)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("EditContactUsContent" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@Content", Content,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_OutDoor Procedure
        /// </summary>
        public static StoredProcedure GetReportOutDoor(int? UserID, string ReportColumns, byte? CountryID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SPrice, int? EPrice, int? Size, string Quality, int? TypeOfAds, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_OutDoor" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@ReportColumns", ReportColumns,DbType.String);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Size", Size,DbType.Int32);
        	    
            sp.Command.AddParameter("@Quality", Quality,DbType.String);
        	    
            sp.Command.AddParameter("@TypeOfAds", TypeOfAds,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_OutDoor_Map Procedure
        /// </summary>
        public static StoredProcedure GetReportOutDoorMap(int? UserID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, int? Size, string Quality, int? TypeOfAds, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_OutDoor_Map" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Size", Size,DbType.Int32);
        	    
            sp.Command.AddParameter("@Quality", Quality,DbType.String);
        	    
            sp.Command.AddParameter("@TypeOfAds", TypeOfAds,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_OutDoor_Paged Procedure
        /// </summary>
        public static StoredProcedure GetReportOutDoorPaged(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, int? Size, string Quality, int? TypeOfAds, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_OutDoor_Paged" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Size", Size,DbType.Int32);
        	    
            sp.Command.AddParameter("@Quality", Quality,DbType.String);
        	    
            sp.Command.AddParameter("@TypeOfAds", TypeOfAds,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Press Procedure
        /// </summary>
        public static StoredProcedure GetReportPress(int? UserID, string ReportColumns, byte? CountryID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SCol, int? ECol, int? ColorCode, int? PageNumber, int? SInch, int? EInch, int? SPrice, int? EPrice, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Press" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@ReportColumns", ReportColumns,DbType.String);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SCol", SCol,DbType.Int32);
        	    
            sp.Command.AddParameter("@ECol", ECol,DbType.Int32);
        	    
            sp.Command.AddParameter("@ColorCode", ColorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageNumber", PageNumber,DbType.Int32);
        	    
            sp.Command.AddParameter("@SInch", SInch,DbType.Int32);
        	    
            sp.Command.AddParameter("@EInch", EInch,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_Press_Paged Procedure
        /// </summary>
        public static StoredProcedure GetReportPressPaged(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_Press_Paged" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetSiteUsers_Paged Procedure
        /// </summary>
        public static StoredProcedure GetSiteUsersPaged(int? Page, int? PageSize, int? CompanyCode)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetSiteUsers_Paged" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@CompanyCode", CompanyCode,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the OLD_GetReport_All Procedure
        /// </summary>
        public static StoredProcedure OldGetReportAll(int? UserID, byte? CountryID, DateTime? SDate, DateTime? EDate, bool? SearchFromTV, bool? SearchFromRD, bool? SearchFromCB, bool? SearchFromPR, bool? SearchFromOD, string MediaCodes, int? SectorCode, int? SubSectorCode, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SPrice, int? EPrice, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("OLD_GetReport_All" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@SearchFromTV", SearchFromTV,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromRD", SearchFromRD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromCB", SearchFromCB,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromPR", SearchFromPR,DbType.Boolean);
        	    
            sp.Command.AddParameter("@SearchFromOD", SearchFromOD,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the OLD_GetReport_Commercial Procedure
        /// </summary>
        public static StoredProcedure OldGetReportCommercial(int? UserID, string ReportColumns, byte? CountryID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SDuration, int? EDuration, int? PosInBreak, int? SPrice, int? EPrice, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("OLD_GetReport_Commercial" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@ReportColumns", ReportColumns,DbType.String);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDuration", SDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@EDuration", EDuration,DbType.Int32);
        	    
            sp.Command.AddParameter("@PosInBreak", PosInBreak,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the OLD_GetReport_OutDoor Procedure
        /// </summary>
        public static StoredProcedure OldGetReportOutDoor(int? UserID, string ReportColumns, byte? CountryID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SPrice, int? EPrice, int? Size, string Quality, int? TypeOfAds, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("OLD_GetReport_OutDoor" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@ReportColumns", ReportColumns,DbType.String);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Size", Size,DbType.Int32);
        	    
            sp.Command.AddParameter("@Quality", Quality,DbType.String);
        	    
            sp.Command.AddParameter("@TypeOfAds", TypeOfAds,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the OLD_GetReport_OutDoor_Map Procedure
        /// </summary>
        public static StoredProcedure OldGetReportOutDoorMap(int? UserID, string ReportColumns, byte? CountryID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SPrice, int? EPrice, int? Size, string Quality, int? TypeOfAds, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("OLD_GetReport_OutDoor_Map" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@ReportColumns", ReportColumns,DbType.String);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Size", Size,DbType.Int32);
        	    
            sp.Command.AddParameter("@Quality", Quality,DbType.String);
        	    
            sp.Command.AddParameter("@TypeOfAds", TypeOfAds,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the OLD_GetReport_Press Procedure
        /// </summary>
        public static StoredProcedure OldGetReportPress(int? UserID, string ReportColumns, byte? CountryID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, int? ProgramCode, int? SectorCode, int? SubSectorCode, int? SubSector2Code, int? CategoryCode, int? AdvertiserCode, int? BrandCode, int? ProductCode, int? ProdVersionCode, int? AgencyCode, int? STime, int? ETime, int? SCol, int? ECol, int? ColorCode, int? PageNumber, int? SInch, int? EInch, int? SPrice, int? EPrice, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("OLD_GetReport_Press" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@ReportColumns", ReportColumns,DbType.String);
        	    
            sp.Command.AddParameter("@CountryID", CountryID,DbType.Byte);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@ProgramCode", ProgramCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSector2Code", SubSector2Code,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@BrandCode", BrandCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProdVersionCode", ProdVersionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AgencyCode", AgencyCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@STime", STime,DbType.Int32);
        	    
            sp.Command.AddParameter("@ETime", ETime,DbType.Int32);
        	    
            sp.Command.AddParameter("@SCol", SCol,DbType.Int32);
        	    
            sp.Command.AddParameter("@ECol", ECol,DbType.Int32);
        	    
            sp.Command.AddParameter("@ColorCode", ColorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageNumber", PageNumber,DbType.Int32);
        	    
            sp.Command.AddParameter("@SInch", SInch,DbType.Int32);
        	    
            sp.Command.AddParameter("@EInch", EInch,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the sp_GetReportFilterLookupTables Procedure
        /// </summary>
        public static StoredProcedure SpGetReportFilterLookupTables(int? uid)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("sp_GetReportFilterLookupTables" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@uid", uid,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the countLayoutRecord Procedure
        /// </summary>
        public static StoredProcedure CountLayoutRecord(string layout, string page, int? SiteUserID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("countLayoutRecord" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@layout", layout,DbType.String);
        	    
            sp.Command.AddParameter("@page", page,DbType.String);
        	    
            sp.Command.AddParameter("@SiteUserID", SiteUserID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the getloadLayout Procedure
        /// </summary>
        public static StoredProcedure GetloadLayout(int? userID, string tableName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("getloadLayout" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@userID", userID,DbType.Int32);
        	    
            sp.Command.AddParameter("@tableName", tableName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the DeleteLayout Procedure
        /// </summary>
        public static StoredProcedure DeleteLayout(string Name, string ID, string Page)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("DeleteLayout" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@Name", Name,DbType.String);
        	    
            sp.Command.AddParameter("@ID", ID,DbType.String);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the ProductByCategory Procedure
        /// </summary>
        public static StoredProcedure ProductByCategory(int? CategorID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("ProductByCategory" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@CategorID", CategorID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_News_Paged Procedure
        /// </summary>
        public static StoredProcedure GetReportNewsPaged(int? UserID, int? Page, int? PageSize, string sortColumn, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, string NewsMediaType, int? NewsType, int? SectionCode, int? SectorCode, int? SubSectorCode, int? CategoryCode, int? AdvertiserCode, int? ProductCode, int? SPrice, int? EPrice, bool? Fa, string days)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_News_Paged" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Page", Page,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@sortColumn", sortColumn,DbType.String);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@NewsMediaType", NewsMediaType,DbType.String);
        	    
            sp.Command.AddParameter("@NewsTypeCode", NewsType,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectionCode", SectionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            sp.Command.AddParameter("@days", days,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetReport_News_PDF Procedure
        /// </summary>
        public static StoredProcedure GetReportNewsPdf(int? UserID, DateTime? SDate, DateTime? EDate, int? MediaType, string MediaCodes, string NewsMediaType, int? NewsType, int? SectionCode, int? SectorCode, int? SubSectorCode, int? CategoryCode, int? AdvertiserCode, int? ProductCode, int? SPrice, int? EPrice, bool? Fa)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetReport_News_PDF" , DataService.GetInstance("Adex"));
        	
            sp.Command.AddParameter("@UserID", UserID,DbType.Int32);
        	    
            sp.Command.AddParameter("@SDate", SDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EDate", EDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MediaTypeCode", MediaType,DbType.Int32);
        	    
            sp.Command.AddParameter("@MediaCodes", MediaCodes,DbType.String);
        	    
            sp.Command.AddParameter("@NewsMediaType", NewsMediaType,DbType.String);
        	    
            sp.Command.AddParameter("@NewsTypeCode", NewsType,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectionCode", SectionCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SectorCode", SectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SubSectorCode", SubSectorCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@CategoryCode", CategoryCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@AdvertiserCode", AdvertiserCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@ProductCode", ProductCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@SPrice", SPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@EPrice", EPrice,DbType.Int32);
        	    
            sp.Command.AddParameter("@Fa", Fa,DbType.Boolean);
        	    
            return sp;
        }

        
    }

    
}

